'''

@author: wyndem
@Emil:   wyndem@qq.com
@FileName: main.py
@Time: 2019/2/22 10:13
@Software: PyCharm
@Description: 

'''

from aiohttp import web

from application.routes import setup_routes
from db.sqlLiteUtil import createDB
from autoCard import start, stop

app = web.Application()
setup_routes(app)
app.on_startup.append(createDB)
app.on_startup.append(start)
app.on_shutdown.append(stop)
web.run_app(app, host='0.0.0.0', port=80)